<template>
	<view>
		<stop isBack>
			<view slot="content">活动信息</view>
		</stop>
		<view class="bcf pad3" v-if="isbool(item)">
			<view class="flrc fwb fs12">
				<status :item="item.type" classes="round3"></status>
				<view class="padl2 flex1">{{item.name}}</view>
			</view>
			<view class="flrc padb2 mart3">
				<view>开始时间：</view>
				<view class="flex1 tar">{{datetime(item.startAt)}}</view>
			</view>
			<view class="flrc padb2">
				<view>结束时间：</view>
				<view class="flex1 tar">{{datetime(item.endAt)}}</view>
			</view>
			<view class="flrc padb2">
				<view>活动地点：</view>
				<view class="flex1 tar">{{item.address}}</view>
			</view>
			<view class="flrc padb2">
				<view>预估时间：</view>
				<view class="flex1 tar">{{item.time}}</view>
			</view>
			<view class="flrc padb2">
				<view>预估费用：</view>
				<view class="flex1 tar">{{item.money}}</view>
			</view>
			<view class="">
				<!-- <view class="list-style-2">活动内容</view> -->
				<view class="mart3 bdda pad2 bc13" v-html="item.intro"></view>
			</view>
			<view class="mart3 bc13 pad2">
				<view class="list-style-1">参与人员</view>
			<!-- 	<view class=" lh2">
					<view class="flrc" v-for="user in item.users">
						<view class="flex1">{{user.department.name}}</view>
						<view>{{user.name}}</view>
					</view>
				</view> -->
				<view class=" lh2 padt2">
					<view class="flex-r flex-wrap flex-start">
						<view class="cu-btn line-cyan sm mar1" v-for="user in item.users">{{user.name}}</view>
					</view>
				</view>
			</view>
			<view class="mart3 bc13 pad2">
				<view class="list-style-1">参与部门</view>
				<view class=" lh2 padt2">
					<view class="flex-r flex-wrap flex-start">
						<view class="cu-btn line-cyan sm mar1" v-for="department in item.departments">{{department.name}}</view>
					</view>
				</view>
			</view>
			<view class="list-style-2 mart3">发布与审核</view>
			<view class="flrc padb2 mart3" v-if="isbool(item.createBy)">
				<view>创建人：</view>
				<view class="flex1 tar">{{item.createBy.name}}</view>
			</view>
			<view class="flrc padb2" v-if="isbool(item.checkBy)">
				<view>审核人：</view>
				<view class="flex1 tar">{{item.checkBy.name}}</view>
			</view>
			<view class="flrc padb2">
				<view>创建时间：</view>
				<view class="flex1 tar">{{datetime(item.createAt)}}</view>
			</view>
			<view class="flrc padb2">
				<view>审核时间：</view>
				<view class="flex1 tar">{{datetime(item.checkAt)}}</view>
			</view>
			<!-- {{item}} -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				item:''
			}
		},
		methods: {
			
		},
		onLoad(option) {
			this.id = option.id
			this.$api.get('/api/cimingActivitys/' + option.id,{
				_g:['activity','user','department']
			},res=>{
				this.item = res.d
			})
		}
	}
</script>

<style>

</style>
